package com.zhongwang.mms.gen.entity;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class TDeptExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public TDeptExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andDepIdIsNull() {
            addCriterion("dep_id is null");
            return (Criteria) this;
        }

        public Criteria andDepIdIsNotNull() {
            addCriterion("dep_id is not null");
            return (Criteria) this;
        }

        public Criteria andDepIdEqualTo(Integer value) {
            addCriterion("dep_id =", value, "depId");
            return (Criteria) this;
        }

        public Criteria andDepIdNotEqualTo(Integer value) {
            addCriterion("dep_id <>", value, "depId");
            return (Criteria) this;
        }

        public Criteria andDepIdGreaterThan(Integer value) {
            addCriterion("dep_id >", value, "depId");
            return (Criteria) this;
        }

        public Criteria andDepIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("dep_id >=", value, "depId");
            return (Criteria) this;
        }

        public Criteria andDepIdLessThan(Integer value) {
            addCriterion("dep_id <", value, "depId");
            return (Criteria) this;
        }

        public Criteria andDepIdLessThanOrEqualTo(Integer value) {
            addCriterion("dep_id <=", value, "depId");
            return (Criteria) this;
        }

        public Criteria andDepIdIn(List<Integer> values) {
            addCriterion("dep_id in", values, "depId");
            return (Criteria) this;
        }

        public Criteria andDepIdNotIn(List<Integer> values) {
            addCriterion("dep_id not in", values, "depId");
            return (Criteria) this;
        }

        public Criteria andDepIdBetween(Integer value1, Integer value2) {
            addCriterion("dep_id between", value1, value2, "depId");
            return (Criteria) this;
        }

        public Criteria andDepIdNotBetween(Integer value1, Integer value2) {
            addCriterion("dep_id not between", value1, value2, "depId");
            return (Criteria) this;
        }

        public Criteria andDepNameIsNull() {
            addCriterion("dep_name is null");
            return (Criteria) this;
        }

        public Criteria andDepNameIsNotNull() {
            addCriterion("dep_name is not null");
            return (Criteria) this;
        }

        public Criteria andDepNameEqualTo(String value) {
            addCriterion("dep_name =", value, "depName");
            return (Criteria) this;
        }

        public Criteria andDepNameNotEqualTo(String value) {
            addCriterion("dep_name <>", value, "depName");
            return (Criteria) this;
        }

        public Criteria andDepNameGreaterThan(String value) {
            addCriterion("dep_name >", value, "depName");
            return (Criteria) this;
        }

        public Criteria andDepNameGreaterThanOrEqualTo(String value) {
            addCriterion("dep_name >=", value, "depName");
            return (Criteria) this;
        }

        public Criteria andDepNameLessThan(String value) {
            addCriterion("dep_name <", value, "depName");
            return (Criteria) this;
        }

        public Criteria andDepNameLessThanOrEqualTo(String value) {
            addCriterion("dep_name <=", value, "depName");
            return (Criteria) this;
        }

        public Criteria andDepNameLike(String value) {
            addCriterion("dep_name like", value, "depName");
            return (Criteria) this;
        }

        public Criteria andDepNameNotLike(String value) {
            addCriterion("dep_name not like", value, "depName");
            return (Criteria) this;
        }

        public Criteria andDepNameIn(List<String> values) {
            addCriterion("dep_name in", values, "depName");
            return (Criteria) this;
        }

        public Criteria andDepNameNotIn(List<String> values) {
            addCriterion("dep_name not in", values, "depName");
            return (Criteria) this;
        }

        public Criteria andDepNameBetween(String value1, String value2) {
            addCriterion("dep_name between", value1, value2, "depName");
            return (Criteria) this;
        }

        public Criteria andDepNameNotBetween(String value1, String value2) {
            addCriterion("dep_name not between", value1, value2, "depName");
            return (Criteria) this;
        }

        public Criteria andDepOrderNoIsNull() {
            addCriterion("dep_order_no is null");
            return (Criteria) this;
        }

        public Criteria andDepOrderNoIsNotNull() {
            addCriterion("dep_order_no is not null");
            return (Criteria) this;
        }

        public Criteria andDepOrderNoEqualTo(Integer value) {
            addCriterion("dep_order_no =", value, "depOrderNo");
            return (Criteria) this;
        }

        public Criteria andDepOrderNoNotEqualTo(Integer value) {
            addCriterion("dep_order_no <>", value, "depOrderNo");
            return (Criteria) this;
        }

        public Criteria andDepOrderNoGreaterThan(Integer value) {
            addCriterion("dep_order_no >", value, "depOrderNo");
            return (Criteria) this;
        }

        public Criteria andDepOrderNoGreaterThanOrEqualTo(Integer value) {
            addCriterion("dep_order_no >=", value, "depOrderNo");
            return (Criteria) this;
        }

        public Criteria andDepOrderNoLessThan(Integer value) {
            addCriterion("dep_order_no <", value, "depOrderNo");
            return (Criteria) this;
        }

        public Criteria andDepOrderNoLessThanOrEqualTo(Integer value) {
            addCriterion("dep_order_no <=", value, "depOrderNo");
            return (Criteria) this;
        }

        public Criteria andDepOrderNoIn(List<Integer> values) {
            addCriterion("dep_order_no in", values, "depOrderNo");
            return (Criteria) this;
        }

        public Criteria andDepOrderNoNotIn(List<Integer> values) {
            addCriterion("dep_order_no not in", values, "depOrderNo");
            return (Criteria) this;
        }

        public Criteria andDepOrderNoBetween(Integer value1, Integer value2) {
            addCriterion("dep_order_no between", value1, value2, "depOrderNo");
            return (Criteria) this;
        }

        public Criteria andDepOrderNoNotBetween(Integer value1, Integer value2) {
            addCriterion("dep_order_no not between", value1, value2, "depOrderNo");
            return (Criteria) this;
        }

        public Criteria andDepStatusIsNull() {
            addCriterion("dep_status is null");
            return (Criteria) this;
        }

        public Criteria andDepStatusIsNotNull() {
            addCriterion("dep_status is not null");
            return (Criteria) this;
        }

        public Criteria andDepStatusEqualTo(Integer value) {
            addCriterion("dep_status =", value, "depStatus");
            return (Criteria) this;
        }

        public Criteria andDepStatusNotEqualTo(Integer value) {
            addCriterion("dep_status <>", value, "depStatus");
            return (Criteria) this;
        }

        public Criteria andDepStatusGreaterThan(Integer value) {
            addCriterion("dep_status >", value, "depStatus");
            return (Criteria) this;
        }

        public Criteria andDepStatusGreaterThanOrEqualTo(Integer value) {
            addCriterion("dep_status >=", value, "depStatus");
            return (Criteria) this;
        }

        public Criteria andDepStatusLessThan(Integer value) {
            addCriterion("dep_status <", value, "depStatus");
            return (Criteria) this;
        }

        public Criteria andDepStatusLessThanOrEqualTo(Integer value) {
            addCriterion("dep_status <=", value, "depStatus");
            return (Criteria) this;
        }

        public Criteria andDepStatusIn(List<Integer> values) {
            addCriterion("dep_status in", values, "depStatus");
            return (Criteria) this;
        }

        public Criteria andDepStatusNotIn(List<Integer> values) {
            addCriterion("dep_status not in", values, "depStatus");
            return (Criteria) this;
        }

        public Criteria andDepStatusBetween(Integer value1, Integer value2) {
            addCriterion("dep_status between", value1, value2, "depStatus");
            return (Criteria) this;
        }

        public Criteria andDepStatusNotBetween(Integer value1, Integer value2) {
            addCriterion("dep_status not between", value1, value2, "depStatus");
            return (Criteria) this;
        }

        public Criteria andDepPidIsNull() {
            addCriterion("dep_pid is null");
            return (Criteria) this;
        }

        public Criteria andDepPidIsNotNull() {
            addCriterion("dep_pid is not null");
            return (Criteria) this;
        }

        public Criteria andDepPidEqualTo(Integer value) {
            addCriterion("dep_pid =", value, "depPid");
            return (Criteria) this;
        }

        public Criteria andDepPidNotEqualTo(Integer value) {
            addCriterion("dep_pid <>", value, "depPid");
            return (Criteria) this;
        }

        public Criteria andDepPidGreaterThan(Integer value) {
            addCriterion("dep_pid >", value, "depPid");
            return (Criteria) this;
        }

        public Criteria andDepPidGreaterThanOrEqualTo(Integer value) {
            addCriterion("dep_pid >=", value, "depPid");
            return (Criteria) this;
        }

        public Criteria andDepPidLessThan(Integer value) {
            addCriterion("dep_pid <", value, "depPid");
            return (Criteria) this;
        }

        public Criteria andDepPidLessThanOrEqualTo(Integer value) {
            addCriterion("dep_pid <=", value, "depPid");
            return (Criteria) this;
        }

        public Criteria andDepPidIn(List<Integer> values) {
            addCriterion("dep_pid in", values, "depPid");
            return (Criteria) this;
        }

        public Criteria andDepPidNotIn(List<Integer> values) {
            addCriterion("dep_pid not in", values, "depPid");
            return (Criteria) this;
        }

        public Criteria andDepPidBetween(Integer value1, Integer value2) {
            addCriterion("dep_pid between", value1, value2, "depPid");
            return (Criteria) this;
        }

        public Criteria andDepPidNotBetween(Integer value1, Integer value2) {
            addCriterion("dep_pid not between", value1, value2, "depPid");
            return (Criteria) this;
        }

        public Criteria andDepCreateTimeIsNull() {
            addCriterion("dep_create_time is null");
            return (Criteria) this;
        }

        public Criteria andDepCreateTimeIsNotNull() {
            addCriterion("dep_create_time is not null");
            return (Criteria) this;
        }

        public Criteria andDepCreateTimeEqualTo(Date value) {
            addCriterion("dep_create_time =", value, "depCreateTime");
            return (Criteria) this;
        }

        public Criteria andDepCreateTimeNotEqualTo(Date value) {
            addCriterion("dep_create_time <>", value, "depCreateTime");
            return (Criteria) this;
        }

        public Criteria andDepCreateTimeGreaterThan(Date value) {
            addCriterion("dep_create_time >", value, "depCreateTime");
            return (Criteria) this;
        }

        public Criteria andDepCreateTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("dep_create_time >=", value, "depCreateTime");
            return (Criteria) this;
        }

        public Criteria andDepCreateTimeLessThan(Date value) {
            addCriterion("dep_create_time <", value, "depCreateTime");
            return (Criteria) this;
        }

        public Criteria andDepCreateTimeLessThanOrEqualTo(Date value) {
            addCriterion("dep_create_time <=", value, "depCreateTime");
            return (Criteria) this;
        }

        public Criteria andDepCreateTimeIn(List<Date> values) {
            addCriterion("dep_create_time in", values, "depCreateTime");
            return (Criteria) this;
        }

        public Criteria andDepCreateTimeNotIn(List<Date> values) {
            addCriterion("dep_create_time not in", values, "depCreateTime");
            return (Criteria) this;
        }

        public Criteria andDepCreateTimeBetween(Date value1, Date value2) {
            addCriterion("dep_create_time between", value1, value2, "depCreateTime");
            return (Criteria) this;
        }

        public Criteria andDepCreateTimeNotBetween(Date value1, Date value2) {
            addCriterion("dep_create_time not between", value1, value2, "depCreateTime");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}